home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 7 / FM Towns Free Software Collection 7.iso / t_os / artemis / artsrc2 / peek.asm < prev    next >
Assembly Source File  |  1993-11-30  |  877b  |  54 lines

  1. ;    私製ライブラリ・メモリ篇
  2. ;    (c) MATSUUCHI Ryosuke in Jan,1993
  3. ;
  4. ;    peek.asm
  5. ;        任意のセレクタのメモリアクセス
  6. ;
  7. ;    1993. 1. 8(Fri)
  8.  
  9.         public    peekd, poked
  10.  
  11.  
  12.         include    grplib.inc
  13.  
  14.         assume    cs:cseg, ds:dseg
  15.  
  16.  
  17. dseg segment dword 'DATA'
  18.  
  19. dseg ends
  20.  
  21.  
  22. cseg segment dword 'CODE'
  23.  
  24. ;---------------------------------------------------------------
  25. ;    unsigned int peekd(sel, ofs)
  26. ;---------------------------------------------------------------
  27.  
  28. peekd        proc
  29.         mov    ecx,[esp+4]
  30.         mov    edx,[esp+8]
  31.         mov    fs,cx
  32.         mov    eax,fs:[edx]
  33.         ret
  34. peekd        endp
  35.  
  36. ;---------------------------------------------------------------
  37. ;    void poked(sel, ofs, dat)
  38. ;---------------------------------------------------------------
  39.  
  40. poked        proc
  41.         mov    ecx,[esp+4]
  42.         mov    edx,[esp+8]
  43.         mov    eax,[esp+12]
  44.         mov    fs,cx
  45.         mov    fs:[edx],eax
  46.         ret
  47. poked        endp
  48.  
  49.  
  50. cseg ends
  51.  
  52.  
  53. end
  54.